<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
$ngay=array('01','02','03','04','05','06','07','08','09','10','11','12','13','14','15',
'16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31');
$thang=array('01','02','03','04','05','06','07','08','09','10','11','12');
$gioitinh=array('Male','Female');
$tinhtrang=array('Single','Marriaged');
$songuoiphuthuoc=array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20);
$nam=array('1910','1911','1912','1913','1914','1915','1916','1917','1918','1919',
            '1920','1921','1922','1923','1924','1925','1926','1927','1928','1929',
            '1930','1931','1932','1933','1934','1935','1936','1937','1938','1939',
            '1940','1941','1942','1943','1944','1945','1946','1947','1948','1949',
            '1950','1951','1952','1953','1954','1955','1956','1957','1958','1959',
           '1960','1961','1962','1963','1964','1965','1966','1967','1968','1969',
           '1970','1971','1972','1973','1974','1975','1976','1977','1978','1979',
           '1980','1981','1982','1983','1984','1985','1986','1987','1988','1989',
           '1990','1991','1992','1993','1994','1995','1996','1997','1998','1999',
           '2000','2001','2002','2003','2004','2005','2006','2007','2008','2009',
           '2010','2011','2012','2013','2014','2015','2016','2017','2018','2019');
$national=array(0=>'VietNamese',1=>'Foreigners');
$vitriungtuyen=array('Manager','Developer','Tester');
?>
<form action="<?php echo base_url()?>CV/insertCV" name="formInsertCV" method="POST" onsubmit="return checkFormInsertCV();">
<table id="box-table-a" cellspacing="1" align="right" width="900px">
    <tr>
        <td colspan="6" class="bar">Insert new CV</td>
    </tr>
    <tr>
        <td class="row10" align="left">
            Full Name
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtFullName" class="form" value="<?php if(isset($FullName)) echo $FullName?>">
        </td>
        <td class="row10" align="left">
            First Name
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtFirstName" class="form" value="<?php if(isset($FirstName)) echo $FirstName?>">
        </td>
        
    </tr>
    <tr>
        <td class="row10" align="left">
            Last Name
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtLastName" class="form" value="<?php if(isset($LastName)) echo $LastName?>">
        </td>
        <td class="row10" align="left">
            Birthday
        </td>
        <td class="row12" align="left">
            <select name="txtDay">
                <?php
                                   foreach($ngay as $item){
                                     if($item == $Day)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtMonth">
                <?php
                                   foreach($thang as $item){
                                     if($item == $Month)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtYear">
                <?php
                                   foreach($nam as $item){
                                     if($item == $Year)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
        
    </tr>
    <tr>
        <td class="row10" align="left">
            Place of Birthday
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtPlaceBirthday" class="form" value="<?php if(isset($POB)) echo $POB?>">
        </td>
        <td class="row10" align="left">
            Marital Status
        </td>
        <td class="row12" align="left">
            <select name="txtMaritalStatus">
                <?php
                                   foreach($tinhtrang as $item){
                                     if($item == $Marital)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
    </tr>
    <tr>
        <td class="row10" align="left">
            Gender
        </td>
        <td class="row12" align="left">
            <select name="txtGender">
                <?php
                                   foreach($gioitinh as $item){
                                     if($item == $Gender)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
        <td class="row10" align="left">
            ID Number/Passport Number
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtIDNumber" class="form" value="<?php if(isset($IDNumber)) echo $IDNumber?>">
        </td>
        
    </tr>
    <tr>
        <td class="row10" align="left">
            Date of Issue
        </td>
        <td class="row12" align="left">
             <select name="txtDayIssue">
                <?php
                                   foreach($ngay as $item){
                                     if($item == $DayIssue)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtMonthIssue">
                <?php
                                   foreach($thang as $item){
                                     if($item == $MonthIssue)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
            <select name="txtYearIssue">
                <?php
                                   foreach($nam as $item){
                                     if($item == $YearIssue)
                                     echo "<option selected>$item</option>";
                                     else echo "<option>$item</option>";
                                   }
                      ?>
            </select>
        </td>
        <td class="row10" align="left">
            Place of Issue
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtPOI" class="form" value="<?php if(isset($POI)) echo $POI?>">
        </td>
        
    </tr>
    <tr>
        <td class="row10" align="left">
            Personal Email 1
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtPersonalEmail1" class="form" value="<?php if(isset($PersonalEmail1)) echo $PersonalEmail1?>">
        </td>
        <td class="row10" align="left">
            Personal Email 2
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtPersonalEmail2" class="form" value="<?php if(isset($PersonalEmail2)) echo $PersonalEmail2?>">
        </td>
        
    </tr>
    <tr>
        <td class="row10" align="left">
            Home Phone
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtHomePhone" class="form" value="<?php if(isset($HomePhone)) echo $HomePhone?>">
        </td>
        <td class="row10" align="left">
            Cell Phone
        </td>
        <td class="row12" align="left">
            <input type="text" name="txtCellPhone" class="form" value="<?php if(isset($CellPhone)) echo $CellPhone?>">
        </td>
        
        
    </tr>
    <tr>
        <td class="row10" align="left">
            CV Sum up
        </td>
        <td class="row12" align="left" >
            <textarea name="txtCVSUmup"><?php if(isset($CVSumup)) echo $CVSumup?></textarea>
        </td>
        <td class="row10" align="left">
            Foreigners
        </td>
        <td class="row12" align="left">
            
            <select name="txtForeigners">
                <?php
                                   foreach($national as $item=>$value){
                                     if($item == $Foreigners)
                                     echo "<option selected value=$item>$value</option>";
                                     else echo "<option value=$item>$value</option>";
                                   }
                      ?>
            </select>
        </td>
    </tr>
    <tr>
        <td class="row10" align="left">
            Position Interview
        </td>
        <td class="row12" align="left" colspan="3">
            <input type="text" name="txtPositionInterview" class="form" value="<?php if(isset($PositionInterview)) echo $PositionInterview?>">
        </td>
        
    </tr>
    <tr>
        <td class="row1" align="right" colspan="2"><input type="submit" name="insert" id="submit" value="Insert"></td>
        <td class="row1" align="left" colspan="2"><input type="reset" name="Reset" id="submit" value="Reset"></td>
    </tr>
    <tr>
        <td class="row1" align="center" colspan="4"><strong><?php if(isset($exist_idnumber)) echo $exist_idnumber?></strong></td>
    </tr>
      <tr>
        <td class="row1" align="center" colspan="4">
            <?php $titleback = '<img src ="'.base_url().'templates/images/icons/back.jpg" width=40 height=25 title="Back"/>';
            $back = anchor("interview/loadListCV",$titleback);
            echo $back;?>
        </td>
    </tr>
</table>
</form>
